Index: themes/common/webapp/common/js/util/OfbizUtil.js
===================================================================
--- themes/common/webapp/common/js/util/OfbizUtil.js	(revision 1815708)
+++ themes/common/webapp/common/js/util/OfbizUtil.js	(working copy)
@@ -67,6 +67,13 @@
         }
         element.elrte(opts);
     });
+    jQuery(bind_element).find("[data-inplace-editor-url]").each(function(){
+        var element = jQuery(this);
+        var id =  element.attr("id");
+        var url = element.data("inplace-editor-url");
+        var params = element.data("inplace-editor-params");
+        ajaxInPlaceEditDisplayField(id, url, (new Function("return " + params + ";")()));
+    });
 
 }
 
Index: themes/common/template/macro/HtmlFormMacroLibrary.ftl
===================================================================
--- themes/common/template/macro/HtmlFormMacroLibrary.ftl	(revision 1815708)
+++ themes/common/template/macro/HtmlFormMacroLibrary.ftl	(working copy)
@@ -28,7 +28,7 @@
     <img src="${imageLocation}" alt=""><#lt/>
   <#else>
     <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true" || title?has_content>
-      <span <#if idName?has_content>id="cc_${idName}"</#if> <#if title?has_content>title="${title}"</#if> <@renderClass class alert />><#t/>
+      <span data-inplace-editor-url="${inPlaceEditorUrl}" data-inplace-editor-params="${inPlaceEditorParams}" <#if idName?has_content>id="cc_${idName}"</#if> <#if title?has_content>title="${title}"</#if> <@renderClass class alert />><#t/>
     </#if>
 
     <#if description?has_content>
@@ -39,11 +39,6 @@
     <#if inPlaceEditorUrl?has_content || class?has_content || alert=="true">
       </span><#lt/>
     </#if>
-    <#if inPlaceEditorUrl?has_content && idName?has_content>
-      <script language="JavaScript" type="text/javascript"><#lt/>
-        ajaxInPlaceEditDisplayField('cc_${idName}', '${inPlaceEditorUrl}', ${inPlaceEditorParams});<#lt/>
-      </script><#lt/>
-    </#if>
   </#if>
 </#macro>
 <#macro renderHyperlinkField></#macro>
